<template>
	<div v-if="value" :class="['loading-modal', mask?'':'clickabled']">
		<div class="wraper">
			<i class="iconfont spin">&#xe6d1;</i>
			<slot></slot>
		</div>
	</div>
</template>

<script>
	export default{
		props:{
			'value':{type:Boolean},
			'mask':{type:Boolean,default:true}
		}
	}
</script>

<style lang="scss">
.loading-modal{
	position: fixed;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 998;
	&.clickabled{
		pointer-events: none;
	}
	.wraper{
		width: 100px;
		height: 100px;
		display: flex;
		align-items: center;
		align-content: center;
		justify-content: center;
		flex-wrap: wrap;
		border-radius: 5px;
		background: #fff;
		box-shadow: 0 0 15px 0 rgba(0,0,0,0.08);
	}
	.spin{
		font-size: 26px;
	}
}
</style>
